import { ActionDesc, PagesKey } from '@/global/constant'
import { IContentConfig, TableItemType } from '@/components/page-content/type'

const shopListContent: IContentConfig = {
  pageKey: PagesKey.IntegralShop,
  tableConfig: {
    // bordered: true
    size: 'small',
    scroll: {
      x: 1280
    },
    rowKey: 'shopId'
  },
  isShowPagination: true,
  isShowRowSelection: false,
  isShowMoreAction: true,
  moreActions: [
    { key: ActionDesc.Edit, label: '修改' },
    { key: ActionDesc.Delete, label: '删除' }
  ],
  isShowAddBtn: true,
  isShowBatchBtn: false,
  tableItems: [
    {
      type: TableItemType.Column,
      title: '商品名称',
      dataIndex: 'shopName',
      width: 300
    },
    {
      type: TableItemType.Column,
      title: '商品图片',
      dataIndex: 'shopImage',
      customkey: 'shopImage',
      width: 100
    },
    {
      type: TableItemType.Column,
      title: '所需积分',
      dataIndex: 'shopIntegral'
    },
    {
      type: TableItemType.Column,
      title: '商品状态',
      dataIndex: 'shopStatus',
      customkey: 'shopStatus'
    },
    {
      type: TableItemType.Column,
      title: '库存预警数量',
      dataIndex: 'earlyWarningNum',
      customkey: 'earlyWarningNum',
      width: 100
    },
    {
      type: TableItemType.Column,
      title: '商品数量',
      dataIndex: 'shopNum',
      customkey: 'shopNum'
    },
    {
      type: TableItemType.Column,
      title: '创建时间',
      dataIndex: 'createTime',
      width: 160
    },
    {
      type: TableItemType.Column,
      title: '创建人',
      dataIndex: 'createBy'
    },
    {
      type: TableItemType.Column,
      title: '更新时间',
      dataIndex: 'updateTime',
      width: 160
    },
    {
      type: TableItemType.Column,
      title: '更新人',
      dataIndex: 'updateBy'
    }
  ]
}

export default shopListContent
